2006-03-20 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtknotebook.c (gtk_notebook_remove_tab_label): Don't leave
+ page->tab_label dangling.
+ (gtk_notebook_real_remove): Use GTK_IN_DESTRUCTION.
+ (gtk_notebook_destroy): Leave the removal of the children
+ to the container destroy method. (#319032, Yevgen Muntyan)
+
+2006-03-20 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkcombobox.c (gtk_combo_box_remove): Use the existing
+ GTK_IN_DESTRUCTION flag, rather than roll our own.
+
+2006-03-20 Matthias Clasen <mclasen@redhat.com>
+
* gtk/gtk.symbols:
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c: Add a window-placement-set property
2006-03-20 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtknotebook.c (gtk_notebook_remove_tab_label): Don't leave
+ page->tab_label dangling.
+ (gtk_notebook_real_remove): Use GTK_IN_DESTRUCTION.
+ (gtk_notebook_destroy): Leave the removal of the children
+ to the container destroy method. (#319032, Yevgen Muntyan)
+
+2006-03-20 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkcombobox.c (gtk_combo_box_remove): Use the existing
+ GTK_IN_DESTRUCTION flag, rather than roll our own.
+
+2006-03-20 Matthias Clasen <mclasen@redhat.com>
+
* gtk/gtk.symbols:
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c: Add a window-placement-set property
guint popup_in_progress : 1;
guint popup_shown : 1;
- guint destroying : 1;
guint add_tearoffs : 1;
guint has_frame : 1;
guint is_cell_renderer : 1;
gtk_widget_unparent (widget);
GTK_BIN (container)->child = NULL;
- if (combo_box->priv->destroying)
+ if (GTK_OBJECT_FLAGS (combo_box) & GTK_IN_DESTRUCTION)
return;
gtk_widget_queue_resize (GTK_WIDGET (container));
combo_box->priv->row_separator_data = NULL;
combo_box->priv->row_separator_destroy = NULL;
- combo_box->priv->destroying = 1;
-
GTK_OBJECT_CLASS (parent_class)->destroy (object);
combo_box->priv->cell_view = NULL;
-
- combo_box->priv->destroying = 0;
}
static void
static void gtk_notebook_redraw_tabs (GtkNotebook *notebook);
static void gtk_notebook_redraw_arrows (GtkNotebook *notebook);
static void gtk_notebook_real_remove (GtkNotebook *notebook,
- GList *list,
- gboolean destroying);
+ GList *list);
static void gtk_notebook_update_labels (GtkNotebook *notebook);
static gint gtk_notebook_timer (GtkNotebook *notebook);
static gint gtk_notebook_page_compare (gconstpointer a,
static void
gtk_notebook_destroy (GtkObject *object)
{
- GList *children;
GtkNotebook *notebook = GTK_NOTEBOOK (object);
GtkNotebookPrivate *priv = GTK_NOTEBOOK_GET_PRIVATE (notebook);
if (notebook->menu)
gtk_notebook_popup_disable (notebook);
- children = notebook->children;
- while (children)
- {
- GList *child = children;
- children = child->next;
-
- gtk_notebook_real_remove (notebook, child, TRUE);
- }
-
if (priv->source_targets)
{
gtk_target_list_unref (priv->source_targets);
widget,
page_num);
- gtk_notebook_real_remove (notebook, children, FALSE);
+ gtk_notebook_real_remove (notebook, children);
}
static gboolean
gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
gtk_widget_unparent (page->tab_label);
+ page->tab_label = NULL;
}
}
static void
gtk_notebook_real_remove (GtkNotebook *notebook,
- GList *list,
- gboolean destroying)
+ GList *list)
{
GtkNotebookPage *page;
GList * next_list;
gint need_resize = FALSE;
+ gboolean destroying;
+
+ destroying = GTK_OBJECT_FLAGS (notebook) & GTK_IN_DESTRUCTION;
+
next_list = gtk_notebook_search_page (notebook, list, STEP_PREV, TRUE);
if (!next_list)
next_list = gtk_notebook_search_page (notebook, list, STEP_NEXT, TRUE);